
import http from '@/libs/httpRequest'


/* 资产列表页*/
export const getAssetsListApi = data => { return http.postApi({url:`/isvpc/Asset/index`, data})}

// 新增资产分类
export const createCategory = data => { return http.postApi({url:`/isvpc/Category/add`,data})}
// 更新资产分类
export const updateCategory = data => { return http.postApi({url:`/isvpc/Category/save`,data})}
// 删除资产分类
export const delCategory = data => { return http.postApi({url:`/isvpc/Category/remove`,data})}
// 排序
export const orderCategory = data => { return http.postApi({url:`/isvpc/Category/order`,data})}

/* 新增资产*/
export const addAssetsApiFn = data => { return http.postFormApi({ url: `/isvpc/Asset/add`, data })}





/* 资产详情*/
export const getAssetsInfoApi = params => { return http.getApi({url:`/isvpc/Asset/info`, params})}
/* 编辑资产*/
export const updateAssetsApiFn = data => { return http.postFormApi({ url: `/isvpc/Asset/save`, data })}
/* 资产报废*/
export const scrapAssets = data => { return http.postApi({ url: `/isvpc/Asset/scrap`, data })}
/* 资产删除*/
export const delAssets = data => { return http.postApi({ url: `/isvpc/Asset/remove`, data })}
/* 资产下发*/
export const distributeAssets  = data => { return http.postApi({url:`/isvpc/Asset/down`, data})}


/* 获取二维码打印设置类型*/
export const getQrcodeType = params => { return http.getApi({url:`/isvpc/Asset/qrcodeType`, params})}
/* 二维码打印设置*/
export const setCodeConf = data => { return http.postFormApi({url:`/isvpc/Asset/qrcodeSet`, data})}
// export const getQrcodeType = params => { return http.getApi({url:`/isvpc/Asset/qrcodeType`, params})}
// export const setCodeConf = data => { return http.postFormApi({url:`/isvpc/Asset/qrcodeSet`, data})}

/* 获取转移仓库 不包括自己*/
export const getOtherWarehouse = params => { return http.getApi({url:`/isvpc/Asset/warehouse`, params})}
/* 资产转移仓库*/
export const transferAssets = data => { return http.postApi({url:`/isvpc/Asset/transfer`, data})}


/* 根据资产ID获取退还记录*/
export const getEeturnInfoRecord = params => { return http.getApi({url:`/isvpc/Eeturn/infoRecord`, params})}

/* 根据资产ID获取领用记录*/
export const getReceiceInfoRecord = params => { return http.getApi({url:`/isvpc/Receice/infoRecord`, params})}

/* 根据资产ID获取报失记录*/
export const getLossInfoRecord = params => { return http.getApi({url:`/isvpc/Loss/infoRecord`, params})}

/* 根据资产ID获取报修记录*/
export const getRepairInfoRecord = params => { return http.getApi({url:`/isvpc/Repair/infoRecord`, params})}

/* 根据资产ID获取转移记录*/
export const getTransferInfoRecord = params => { return http.getApi({url:`/isvpc/Transfer/infoRecord`, params})}

/* 资产二维码*/
export const qrCode = params => { return http.getApi({url:`/isvpc/Asset/qrcode`, params})}


// 领用记录
export const getAssetsRecRecord = data => { return http.postApi({url:`/isvpc/Receice/assetRecord`, data})}
// 领用确认
export const confirmReceice = data => { return http.postApi({url:`/isvpc/Receice/confirm`,data})}


// 转移记录
export const getAssetsTransferRecord = data => { return http.postApi({url:`/isvpc/Transfer/transferRecord`, data})}
// 管理员确认
export const adminConfirm = data => { return http.postApi({url:`/isvpc/Transfer/adminConfirm`,data})}


// 退还记录
export const getAssetsReturnRecord = data => { return http.postApi({url:`/isvpc/Eeturn/returnRecord`, data})}
// 资产退还确认
export const confirmReturn = data => { return http.postApi({url:`/isvpc/Eeturn/confirmReturn`,data})}


// 报失记录
export const getAssetsLossRecord = data => { return http.postApi({url:`/isvpc/Loss/lossRecord`, data})}
// 资产报失确认
export const confirmLoss = data => { return http.postApi({url:`/isvpc/Loss/confirmLoss`,data})}


// 回收站资产列表
export const getAssetsRecycleRecord = params => { return http.getApi({url:`/isvpc/Asset/recycle`, params})}
// 资产彻底删除
export const removeAssets = data => { return http.postApi({url:`/isvpc/Asset/remove`,data})}
// 资产还原
export const restoreAsset = data => { return http.postApi({url:`/isvpc/Asset/restore`,data})}

// 转移仓记录
export const getAssetsWareTransferRecord = params => { return http.getApi({url:`/isvpc/Asset/transferRecord`,params})}
// 转移仓确认
export const transferConfirm = data => { return http.postApi({url:`/isvpc/Asset/transferConfirm`,data})}


/* 盘点任务列表*/
export const getAssetcheck = params => { return http.getApi({url:`/isvpc/Assetcheck/index`, params})}
/* 任务明细列表*/
export const getAssetcheckContent = params => { return http.getApi({url:`/isvpc/Assetcheck/content`, params})}
/* 盘点任务明细头部*/
export const getTotal = params => { return http.getApi({url:`/isvpc/Assetcheck/total`, params})}
/* 创建盘点任务*/
export const addAssetcheck = data => { return http.postFormApi({ url: `/isvpc/Assetcheck/add`, data })}
/* 启动盘点任务*/
export const startAssetcheck = data => { return http.postFormApi({ url: `/isvpc/Assetcheck/start`, data })}
/* 暂停盘点任务*/
export const stopAssetcheck = data => { return http.postFormApi({ url: `/isvpc/Assetcheck/suspend`, data })}
/* 启动任务删除*/
export const removeAssetcheck  = data => { return http.postFormApi({url:`/isvpc/Assetcheck/remove`, data})}
/* 获取不同方式盘点情况*/
export const getCheckCount = data => { return http.postFormApi({ url: `/isvpc/Assetcheck/getCheckCount`, data })}


/* 维修部门列表*/
export const getAssetRepairList = params => { return http.getApi({url:`/isvpc/repair/index`, params})}
/* 创建维修部门*/
export const addAssetRepair = data => { return http.postFormApi({ url: `/isvpc/Repair/add`, data })}
/* 修改维修部门名称*/
export const modifyAssetRepair = data => { return http.postFormApi({ url: `/isvpc/Repair/modify`, data })}
/* 获取维修部门绑定的分类*/
export const getCate = params => { return http.getApi({url:`/isvpc/Repair/getCate`, params})}
/* 绑定分类*/
export const bindClass = data => { return http.postFormApi({ url: `/isvpc/Repair/bind`, data })}
/* 绑定成员*/
export const bindAdmin = data => { return http.postFormApi({ url: `/isvpc/Repair/bindAdmin`, data })}
/* 移除管理员*/
export const removeAdmin  = data => { return http.postFormApi({url:`/isvpc/Repair/removeAdmin`, data})}
/* 删除部门*/
export const removeRepairDept  = data => { return http.postFormApi({url:`/isvpc/Repair/removeRepair`, data})}

/* 下载资产导入模板*/
export const downloadTemplate  = data => { return http.postFormApi({url:`/isvpc/Asset/downloadTemplate`, data})}
/* 导入*/
export const importTemplate  = data => { return http.postFormDataApi({url:`/isvpc/Asset/importTemplate`, data})}

export const getNumber  = params => { return http.postFormDataApi({url:`/isvpc/Asset/waitConfirm`, params})}